// app.js
import './utils/utils'
import './utils/http'
App({
  onLaunch() {
    this.getToken()
  },
  globalData: {},
  //保存token
  token: '',
  //保存刷新token
  r_token: '',
  //获取token
  getToken() {
    const token = wx.getStorageSync('token')
    this.token = token
    const r_token = wx.getStorageSync('r_token')
    this.r_token = r_token
  },
  //存储token
  setToken(token, refreshToken) {
    wx.setStorageSync('token', token)
    this.token = token
    wx.setStorageSync('r_token', refreshToken)
    this.r_token = refreshToken
  }
})
